<?php

/** SQL
CREATE TABLE Team_Rankings (
	ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
	idTeam_Listing INTEGER ,idRule_Types INTEGER ,
	iSeason INTEGER ,iGroup INTEGER ,
	iPoints INTEGER ,iRanking INTEGER ,
	iWins INTEGER ,
	iDraws INTEGER ,
	iLosses INTEGER ,
	iTeamValue INTEGER )
*/

class TeamRanking extends AppModel {

	var $name = 'TeamRanking';
	var $primaryKey = 'ID';
	var $useTable = 'team_rankings';

	var $belongsTo = array(
		'Team' => array(
			'className' => 'Team',
			'foreignKey' => 'idTeam_Listing',
			'fields' => array('Team.ID, Team.strName, Team.idRaces, Team.idCoach'),
		),
		'RuleType' => array(
			'className' => 'RuleType',
			'foreignKey' => 'idRule_Types',
			'fields' => array('RuleType.ID, RuleType.idStrings_Localized'),
		)
	);
}
?>